home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1991 July / 1991-07.d64 / dungeon trials (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  9KB  |  384 lines

  1. 0 clr
  2. 1 rem copyright 1991 - compute publications intl ltd - all rights reserved
  3. 5 lvl=1:rm=5
  4. 10 mf=12:tsf=63
  5. 20 for t=1to6
  6. 30 ch(t)=0
  7. 40 nextt
  8. 100 printchr$(147);
  9. 110 poke53281,0:poke53280,11
  10. 115 printtab(12);"[158]reading data..."
  11. 120 forca=12672to12734:readqa:pokeca,qa:next
  12. 130 forcb=12736to12798:readqb:pokecb,qb:next
  13. 140 forcc=12800to12862:readqc:pokecc,qc:next
  14. 150 forcd=12864to12926:readqd:pokecd,qd:next
  15. 160 force=12928to12990:readqe:pokece,qe:next
  16. 170 forcf=12992to13054:readqf:pokecf,qf:next
  17. 180 forda=12288to12350:readza:pokeda,za:next
  18. 190 fordb=12352to12414:readzb:pokedb,zb:next
  19. 200 fordc=12416to12478:readzc:pokedc,zc:next
  20. 210 fordd=12480to12542:readzd:pokedd,zd:next
  21. 220 forde=12544to12606:readze:pokede,ze:next
  22. 230 fordf=12608to12670:readzf:pokedf,zf:next
  23. 235 printchr$(147);
  24. 240 v=53248
  25. 250 pokev+23,tsf
  26. 260 pokev+28,tsf:pokev+37,7:pokev+38,10
  27. 270 pokev+0,50:pokev+1,58
  28. 280 pokev+2,80:pokev+3,58
  29. 290 pokev+4,110:pokev+5,58
  30. 300 pokev+6,140:pokev+7,58
  31. 310 pokev+8,170:pokev+9,58
  32. 320 pokev+10,200:pokev+11,58
  33. 330 poke2040,198:poke2041,199
  34. 340 poke2042,200:poke2043,201
  35. 350 poke2044,202:poke2045,203
  36. 360 pokev+21,tsf
  37. 370 pokev+39,5:pokev+40,6
  38. 380 pokev+41,8:pokev+42,4
  39. 390 pokev+43,6:pokev+44,5
  40. 400 printchr$(19);
  41. 410 poke214,6:print
  42. 415 print"    1   2   3  4   5   6"
  43. 420 print"                          "
  44. 430 fort=1to8
  45. 440 print"   ";tab(25);" "
  46. 450 next
  47. 460 print"                          "
  48. 470 printchr$(19);
  49. 480 poke214,8:print
  50. 490 fort=1to8
  51. 500 print"                      "
  52. 510 next
  53. 520 printchr$(19);
  54. 530 poke214,8:print
  55. 540 printtab(11);"[152][177][178][177][178][177][178]"
  56. 550 printtab(11);"[152][178][177][146][169][223][178][177]"
  57. 560 printtab(11);"[152][177][178][146]  [177][178]"
  58. 570 printtab(11);"[152][178][177][146]  [178][177]"
  59. 580 printtab(11);"[152][177][178][146]  [177][178]"
  60. 590 printtab(10);"[169]      [223]"
  61. 600 printtab(9);"[146][169]        [223]"
  62. 610 printtab(8);"[146][169]          [223]"
  63. 620 printchr$(19);
  64. 630 poke214,10:print
  65. 640 printtab(8);"[146][169]";tab(19);"[146][223]"
  66. 650 printtab(7);"[146][169] ";tab(19);"[146] [223]"
  67. 660 fort=1to2
  68. 670 printtab(7);"[146]  ";tab(19);"[146]  "
  69. 680 nextt
  70. 690 printtab(7);"[146][175][175]";tab(19);"[146][175][175]"
  71. 700 printtab(7);"[146]  ";tab(19);"[146]  "
  72. 710 dm=int(rnd(0)*mf)+1
  73. 720 if dm>6 then mc$="     none"
  74. 730 ifdm=1thensm=192:mnc=12:mc$="    shadow"
  75. 740 ifdm=2thensm=193:mnc=1:mc$="    ghost"
  76. 750 ifdm=3thensm=194:mnc=5:mc$="   serpent"
  77. 760 ifdm=4thensm=195:mnc=6:mc$="winged warrior"
  78. 770 ifdm=5thensm=196:mnc=1:mc$="   skeleton"
  79. 780 ifdm=6thensm=197:mnc=2:mc$=" vapor demon"
  80. 790 printchr$(19);
  81. 910 print
  82. 920 printtab(31);"[146]foe"
  83. 930 printtab(31);"[146][184][184][184]":print
  84. 940 printtab(26);"";tab(26);mc$
  85. 950 if dm>6then1100
  86. 1010 pokev+23,tsf+64:pokev+28,tsf+64
  87. 1020 pokev+37,7:pokev+38,10
  88. 1030 pokev+12,124:pokev+13,140
  89. 1040 poke2046,sm
  90. 1050 pokev+21,tsf+64
  91. 1060 pokev+45,mnc
  92. 1100 printchr$(19);
  93. 1110 poke214,7:print
  94. 1120 printtab(29);"[146]options"
  95. 1130 printtab(29);"[146][163][163][163][163][163][163][163]"
  96. 1140 printtab(29);"f[146]ight"
  97. 1150 printtab(29);"n[146]orth"
  98. 1160 printtab(29);"s[146]outh"
  99. 1170 printtab(29);"e[146]ast"
  100. 1180 printtab(29);"w[146]est"
  101. 1190 getky$:ifky$=""then1190
  102. 1200 if mc$="     none" then 1240
  103. 1210 if ky$="f"then 1290
  104. 1230 goto1190
  105. 1240 if ky$="s"then2200
  106. 1250 if ky$="n"then2530
  107. 1260 if ky$="e"then2700
  108. 1270 if ky$="w"then2900
  109. 1280 goto 1190
  110. 1290 print chr$(19);
  111. 1300 poke214,18:print
  112. 1305 printtab(2);"character to"
  113. 1310 input"  fight with";c
  114. 1311 if c>6 then 1320
  115. 1312 if c<1 then 1320
  116. 1315 if ch(c)=255 then 1320
  117. 1317 goto 1400
  118. 1320 printtab(2);"that character does not exist!"
  119. 1330 printtab(2);"choose again."
  120. 1340 foro=1to1000:nexto
  121. 1350 printchr$(19);
  122. 1360 poke214,18:print
  123. 1365 foro=1to4:print"                                  ":nexto
  124. 1370 goto 1290
  125. 1400 printchr$(19);
  126. 1410 poke214,8:print
  127. 1420 fort=1to8:printtab(3);"                      ":nextt
  128. 1430 pl=1024:pc=55296
  129. 1440 my=124
  130. 1450 px=14:py=13
  131. 1460 if c=1 then cw=30:wc=9
  132. 1470 if c=2 then cw=66:wc=6
  133. 1480 if c=3 then cw=30:wc=9
  134. 1490 if c=4 then cw=42:wc=4
  135. 1500 if c=5 then cw=43:wc=7
  136. 1510 if c=6 then cw=30:wc=9
  137. 1520 poke53275,255
  138. 1530 mdr=int(rnd(0)*2)+1
  139. 1560 if mdr=1andmy-4<50then mdr=2
  140. 1570 if mdr=2andmy+4>192then mdr=1
  141. 1610 if mdr=1 then my=my-8
  142. 1620 if mdr=2 then my=my+8
  143. 1630 jy=peek(56320)
  144. 1640 if jy=127 then1740
  145. 1650 if jy=119 then wx=1
  146. 1660 if jy=123 then wx=-1
  147. 1670 if jy=125 then wy=1
  148. 1680 if jy=126 then wy=-1
  149. 1690 if jy=111 then 1800
  150. 1700 ifpeek(1024+py*40+(px+wx))=160thenwx=0
  151. 1705 ifpeek(1024+(py+wy)*40+px)=160then wy=0
  152. 1710 poke1024+(py*40)+px,32
  153. 1720 px=px+wx
  154. 1730 py=py+wy
  155. 1740 pokepc+(py*40)+px,3
  156. 1750 poke1024+(py*40)+px,91:wx=0:wy=0
  157. 1760 pokev+12,my:pokev+13,140
  158. 1770 goto 1530
  159. 1800 swx=1664
  160. 1810 fx=swx+px
  161. 1820 for fy=fx to (1024+40*py+px) step-40
  162. 1830 pokepc+(fy-1024),wc
  163. 1840 pokefy,cw
  164. 1850 forgj=1to10:nextgj
  165. 1860 pokefy,32:nextfy
  166. 1865 if mdr=1 then my=my+8
  167. 1870 if mdr=2 then my=my-8
  168. 1875 hm=int(my/8)
  169. 1880 if py=11 then 1900
  170. 1890 if py=12 then 1900
  171. 1895 goto 2000
  172. 1900 if px+1=hm then 1930
  173. 1910 if px+2=hm then 1930
  174. 1920 goto 2000
  175. 1930 forgj=1to10:fort=0to15
  176. 1935 poke v+45,t
  177. 1940 nextt:nextgj
  178. 1945 pokev+21,tsf
  179. 1950 poke53275,0
  180. 1960 printchr$(147);
  181. 1970 goto 400
  182. 2000 if c=1 then vp=39:tsf=tsf-1
  183. 2005 if c=2 then vp=40:tsf=tsf-2
  184. 2010 if c=3 then vp=41:tsf=tsf-4
  185. 2015 if c=4 then vp=42:tsf=tsf-8
  186. 2020 if c=5 then vp=43:tsf=tsf-16
  187. 2025 if c=6 then vp=44:tsf=tsf-32
  188. 2030 ch(c)=255
  189. 2040 forgj=1to10:fort=0to15
  190. 2050 poke v+vp,t
  191. 2060 nextt:nextgj
  192. 2070 poke53275,0
  193. 2080 pokev+21,tsf
  194. 2085 if tsf=0 then 30000
  195. 2090 printchr$(147);
  196. 2095 goto235
  197. 2200 if rm=1 then 10000
  198. 2210 if rm=4 then 10000
  199. 2220 if rm=5 then 10000
  200. 2230 if rm=10 then 10000
  201. 2240 if rm=11 then 10000
  202. 2250 if rm=12 then 10000
  203. 2255 if rm=15 then 10000
  204. 2260 if rm=17 then 10000
  205. 2270 if rm=18 then 10000
  206. 2280 if rm=20 then 10000
  207. 2290 if rm=23 then 10000
  208. 2310 if rm=24 then 10000
  209. 2320 if rm=25 then 10000
  210. 2330 if rm=28 then 10000
  211. 2340 if rm=29 then 20000
  212. 2350 rm=rm+1:goto235
  213. 2530 if rm=1 then 10000
  214. 2540 if rm=5 then 10000
  215. 2550 if rm=6 then 10000
  216. 2560 if rm=11 then 10000
  217. 2570 if rm=12 then 10000
  218. 2580 if rm=13 then 10000
  219. 2590 if rm=16 then 10000
  220. 2600 if rm=18 then 10000
  221. 2610 if rm=19 then 10000
  222. 2620 if rm=21 then 10000
  223. 2630 if rm=24 then 10000
  224. 2640 if rm=25 then 10000
  225. 2650 if rm=26 then 10000
  226. 2660 if rm=29 then 10000
  227. 2670 rm=rm-1:goto235
  228. 2700 if rm=2 then 10000
  229. 2710 if rm=3 then 10000
  230. 2720 if rm=9 then 10000
  231. 2730 if rm=11 then 10000
  232. 2740 if rm=14 then 10000
  233. 2750 if rm=17 then 10000
  234. 2760 if rm=18 then 10000
  235. 2770 if rm=19 then 10000
  236. 2780 if rm=22 then 10000
  237. 2790 if rm=26 then 10000
  238. 2800 if rm=27 then 10000
  239. 2810 if rm=28 then 10000
  240. 2820 if rm=25 then 20000
  241. 2830 rm=rm+5:goto235
  242. 2900 if rm=1 then 10000
  243. 2910 if rm=2 then 10000
  244. 2920 if rm=3 then 10000
  245. 2930 if rm=4 then 10000
  246. 2940 if rm=5 then 10000
  247. 2950 if rm=7 then 10000
  248. 2960 if rm=8 then 10000
  249. 2970 if rm=14 then 10000
  250. 2980 if rm=16 then 10000
  251. 2990 if rm=19 then 10000
  252. 3000 if rm=22 then 10000
  253. 3010 if rm=23 then 10000
  254. 3020 if rm=24 then 10000
  255. 3030 if rm=27 then 10000
  256. 3040 rm=rm-5:goto235
  257. 10000 printchr$(19);
  258. 10010 poke214,8:print
  259. 10015 fort=1to4
  260. 10020 printtab(3);"[152][177][178][177][178][177][178][177][178][177][178][177][178][177][178][177][178][177][178][177][178][177][178]"
  261. 10030 printtab(3);"[152][178][177][178][177][178][177][178][177][178][177][178][177][178][177][178][177][178][177][178][177][178][177]"
  262. 10040 nextt
  263. 10050 printchr$(19);
  264. 10060 poke214,11:print
  265. 10070 printtab(7);"a wall blocks"
  266. 10080 printtab(7);"  this hall  "
  267. 10090 for o=1to1000:nexto
  268. 10100 goto 235
  269. 20000 if lvl=1 then lvl=2:rm=3:goto235
  270. 20010 if lvl=2 then lvl=3:rm=18:goto235
  271. 20020 if lvl=3 then lvl=4:rm=11:goto235
  272. 20030 if lvl=4 then lvl=5:rm=28:goto235
  273. 20040 if lvl=5 then 35000
  274. 30000 printchr$(19);
  275. 30010 poke214,11:print
  276. 30020 printtab(7);"  game over"
  277. 30030 printtab(7);"restart (y/n)"
  278. 30040 getky$:if ky$=""then30040
  279. 30045 if ky$<>"y"thensys64738
  280. 30050 if ky$="y"then restore:goto5
  281. 35000 for j=1to10:fort=0to15
  282. 35010 printchr$(19);
  283. 35020 poke214,11:print
  284. 35030 poke646,t
  285. 35040 printtab(6);"congratulations!"
  286. 35050 nextt:nextj
  287. 35060 goto30030
  288. 40010 rem--archer (girl) *left--
  289. 40020 data1